//Potentiaalikuoppia kuvaavien luokkien abstrakti
//yliluokka on tässä tiedostossa.
//Omat potentiaalit tulee periä tästä luokasta.
//
//Joonas Koskinen
//Pro Gradu Työ
//Jyväskylän Yliopisto

#ifndef CPOT
#define CPOT

//#include "../util/cFilter.h"
//#include "../util/cFIR.h"
#include <string>
#include <vector>
#include <iostream>
#include <cmath>

using std::vector;
using std::string;

class cPot {
private:
	string name;
	double universe;
	double universeLeft;
	double universeRight;
	double depth;
	double width;
	double k;
	double tx;
	double fx;
	double potLeft;
	double potRight;
	double minEnergy;
	double potMin;
	double glue;
	unsigned int l;
        vector<double> discont;
        bool dVecExists;

	bool usingFilter;
public:
	cPot();
	virtual ~cPot();

	static const double atomic_length_m;
	static const double atomic_energy_eV;
        static const double atomic_me;
        static const double atomic_mp;


//	unsigned int activefilter;
//	vector<cFilter *> filter;


	//Set methods here:
	void setDepth(double value);
	void setWidth(double value);
	void setPotLeft(double value);
	void setPotRight(double value);
	void setUniverse(double value);
	void setUniLeft(double value);
	void setUniRight(double value);
	void setFx(double value);
	void setTx(double value);
	void setName(string value);
	void setMinEnergy(double value);
	void setPotMin();
	void set_l(unsigned int value);
	void setGlue(double value);
        void setDiscontVector(vector<double> value);
        void setDiscontVectorExists(bool value);

//	void setUsingFilter(bool value);
//	void setFilterData(vector<double> value);
//	void setFilterStep(double value);
//	void setActiveFilter(unsigned int value);

	//Get methods here:
	string getName() const;
	double getFx() const;
	double getTx() const;
	double getPotRight() const;
	double getPotLeft() const;
	double getDepth() const;
	double getWidth() const;
	double getUniverse() const;
	double getMinEnergy() const;
	double getGlue() const;
        vector<double> getDiscontVector() const;
//	bool isUsingFilter() const;
//	vector<double> getFilterOutput() const;
//	vector<double> getFilterInput() const;
//	double getFilteredPot(double x);
//	double getFilterStep() const;
//	unsigned int getActiveFilter() const;
//	unsigned int getFilterOutputSize() const;
        bool discontVectorExists() const;
	unsigned int get_l() const;

	//Return the x-coord where the potential function has it's global minimum
	double getPotMin() const;

	//Returns the filtered (if isUsingFilter() == true) or the unfiltered potential value at x.
	double potential(double x);

      	//Virtual methods here:
	virtual double getPotentialValueAt(double x)=0;
	virtual void set_k(double value);
	virtual double get_k() const;
	virtual double calculateGluepoint(double energy);
        double getUniverseRight() const;
        double getUniverseLeft() const;
};
#endif
